﻿using System;
using System.Data;
using System.Collections.Generic;
namespace OnlineManagement.IDAL
{
	/// <summary>
	/// 接口层PigPen
	/// </summary>
	public interface IPigPen
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
        bool Exists(int customerId, int hoggerId);
		/// <summary>
		/// 增加一条数据
		/// </summary>
        bool Add(OnlineManagement.Model.PigPen model, string feederName, out string returnValue);
		/// <summary>
		/// 更新一条数据
		/// </summary>
		bool Update(OnlineManagement.Model.PigPen model);
		/// <summary>
		/// 删除一条数据
		/// </summary>
        bool Delete(Guid pigPenID, out string message);
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		OnlineManagement.Model.PigPen DataRowToModel(DataRow row);
		

        /// <summary>
        /// get all pigpens according to hoggeryId
        /// </summary>
        /// <param name="hoggeryId"></param>
        /// <returns></returns>
        List<Model.PigPen> GetAllPigPens(int hoggeryId);

		
		#endregion  成员方法
		#region  MethodEx
        DataSet GetAvailabltePigPens(int hoggeryId);

        /// <summary>
        /// pigpens paging
        /// </summary>
        /// <param name="hoggeryId"></param>
        /// <param name="strWhere"></param>
        /// <param name="strOrderBy"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="iscount"></param>
        /// <param name="rCount"></param>
        /// <returns></returns>
        DataSet PigPensByPaging(int hoggeryId, string strWhere, string strOrderBy, int pageIndex, int pageSize, out int rCount);
		#endregion  MethodEx
	} 
}
